<template>
  <div class="aside">
    <div class="asideLogo"></div>
    <el-menu
      :default-active="active"
      class="el-menu-vertical-demo el-my-menu"
      :collapse="isCollapse"
      text-color="white"
      background-color="#233b59"
      :router="true"
    >
      <el-menu-item index="/managehome">
        <i class="el-icon-s-home"></i>
        <span slot="title">首页</span>
      </el-menu-item>
      <el-submenu index="1">
        <template slot="title">
          <i class="el-icon-notebook-2"></i>
          <span slot="title" color="white">内容管理</span>                                                                                                                   
        </template>
          <el-menu-item index="/contentmanage/sysblog">博客文章</el-menu-item>
          <el-menu-item index="/contentmanage/syscategory">文章分类</el-menu-item>
          <el-menu-item v-if="this.identity == 0" index="/contentmanage/sysrecycle">文章回收站</el-menu-item>
      </el-submenu>
      <el-submenu index="2">
        <template slot="title">
          <i class="el-icon-monitor"></i>
          <span slot="title" color="white">界面管理</span>                                                                                                                   
        </template>
          <el-menu-item index="/facemanage/sysswiper">轮播图管理</el-menu-item>
          <el-menu-item index="/facemanage/sysadvise">广告图管理</el-menu-item>
      </el-submenu>
      <el-menu-item index="/usersmanage" >
        <i class="el-icon-user-solid"></i>
        <span slot="title">用户管理</span>
      </el-menu-item>
      <el-menu-item index="/discussmanage" >
        <i class="el-icon-chat-square"></i>
        <span slot="title">评论管理</span>
      </el-menu-item>
      <el-submenu index="3">
        <template slot="title">
          <i class="el-icon-monitor"></i>
          <span slot="title" color="white">个人设置</span>                                                                                                                   
        </template>
        <el-menu-item index="/personalset/baseData" >基本资料</el-menu-item>
        <el-menu-item index="/personalset/resetHead" >更换头像</el-menu-item>
        <el-menu-item index="/personalset/resetPwd" >修改密码</el-menu-item>
      </el-submenu>
      
    </el-menu>
  </div>
</template>
<script>
export default {
  name: "myAside",
  data() {
    return {
      identity:''
    };
  },
  methods: {
    
  },
  computed:{
    // 活动选项
    active(){
      return this.$route.path
    },
    isCollapse(){
        return this.$store.state.Tab.isCollapse
    }
  },
  mounted(){
    const userObj = JSON.parse(localStorage.getItem('userInfo'))
    this.identity = userObj.identity
  }
};
</script>
  <style lang="less" scoped>
  .aside{
    background: #233b59 ;
     -webkit-box-shadow: 2px 0 6px rgb(0 21 41 / 35%);
     box-shadow: 2px 0 6px rgb(0 21 41 / 35%);
     z-index: 2;
    .asideLogo{
        width: 100%;
        height: 80px;
        background: #233b59  url(@/assets/imgs/asideLogo.png) no-repeat center;
        background-size: contain;
    }
    .el-menu-item,.el-submenu{
        background-color: #233b59;
    }
    .el-menu{
      border-right:none;
    }
  }
.el-menu-vertical-demo:not(.el-menu--collapse) {
  width: 200px;
  min-height: 400px;
}

</style>